/**
 * 
 */
package com.topline.xiaocaifeng.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import com.topline.xiaocaifeng.service.WelcomeService;

/**
 * @author Administrator
 *
 */
// 这里不可以添加@ResponseBody 或者修改为 @RestController
@Controller
public class ThymeleafController {

    @Autowired
    WelcomeService service;
    
    @GetMapping("/thymeleafIndex")
    public String goIndex(Model model){
        
        // 将当前时间放入到model中，属性名为currentTime
        model.addAttribute("currentTime", 22);
        
        // 首页的名称
        return "index11";
        
    }
    
}
